package utils

import (
	"strings"

	"yu.DbPrime/src/db"
)

type KVFactory interface { //分布式接口定义 类似etcd zookeeper等分布式组件
	Parse() string
	UnParse(string)
}

func CreateClass(k string) KVFactory {
	var split = strings.Split(k, "/")
	switch split[1] { //switch不像C，不用break
	case "node":
	case "table":
		return &db.TableInfo{}
	default:
		return nil
	}
	return nil
}
